﻿<%@ Page Language="c#" Inherits="WinnerCMS.WebUI.Admin.Other.Announce" ValidateRequest="false"
    CodeBehind="Announce.aspx.cs" %>

<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>

<!doctype html>
<html>
<head>
    <title>网站公告</title>
    <meta http-equiv="Pragma" content="No-cach" />
    <%: Styles.Render("~/Content/Bootstrap/css") %>
    <%: Scripts.Render("~/Scripts/AdminBase") %>
</head>
<body>
    <form id="Form1" method="post" runat="server">
        <table id="NavigationPath">
            <tr>
                <td>管理导航：<a href="Announce.aspx">公告管理</a>&nbsp;|&nbsp;<a href="Announce.aspx?Action=Add">添加公告</a></td>
            </tr>
        </table>
        <asp:Panel ID="Panel1" runat="server" Visible="False">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tr class="HeaderStyle">
                    <td>公告添加 </td>
                </tr>
                <tr>
                    <td class="border" height="23">
                        <table cellspacing="0" cellpadding="0" width="100%" border="0">
                            <tr>
                                <td align="right"><b>标题：</b></td>
                                <td>
                                    <asp:TextBox ID="txtTitle" runat="server" Width="336px"></asp:TextBox>
                                    &nbsp;&nbsp; <b>立即审核：</b>
                                    <asp:CheckBox ID="cbkPass" runat="server"></asp:CheckBox>
                                    &nbsp; </td>
                            </tr>
                            <tr>
                                <td valign="top" colspan="2">
                                    <WinnerCMS:CKEditorControl ID="CC_Content" runat="server" Height="500px"></WinnerCMS:CKEditorControl></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <p align="center">
                <asp:Button ID="btnOK" runat="server" Text="添加" OnClick="btnOK_Click" CssClass="btn btn-default"></asp:Button>
                &nbsp;&nbsp;
      <asp:Button ID="btnEdit" runat="server" Visible="False" Text="修改" OnClick="btnEdit_Click"
          CssClass="btn btn-default"></asp:Button>
                <asp:Button ID="btnBack" runat="server" Text="返回" OnClick="btnBack_Click"
                    CssClass="btn btn-default"></asp:Button>
            </p>
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" Width="99%">
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                <ProgressTemplate>
                    <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
                </ProgressTemplate>
            </asp:UpdateProgress>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False"
                        DataKeyNames="ID" CssClass="table table-bordered table-condensed"
                        OnRowCommand="GV_List_RowCommand"
                        OnRowDeleting="GV_List_RowDeleting" OnRowDataBound="GV_List_RowDataBound"
                        GridLines="None">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input onclick="javascript: SelectAll(this);" type="checkbox" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="40px" />
                            </asp:TemplateField>
                            <asp:HyperLinkField DataTextField="Title" DataNavigateUrlFields="ID" DataNavigateUrlFormatString="Announce.aspx?Action=Edit&amp;ID={0}" HeaderText="公告标题" />

                            <asp:BoundField DataField="Author" HeaderText="添加人">
                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="UpdateTime" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}"
                                HeaderText="更新时间" HtmlEncode="False">
                                <ItemStyle HorizontalAlign="Center" Width="120px" />
                            </asp:BoundField>
                            <asp:ButtonField DataTextField="Pass" HeaderText="审核" Text="审核" CommandName="Pass">
                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                            </asp:ButtonField>


                            <asp:CommandField HeaderText="删除" ShowDeleteButton="True">
                                <ItemStyle HorizontalAlign="Center" Width="40px" />
                            </asp:CommandField>
                        </Columns>
                        <HeaderStyle CssClass="HeaderStyle" />
                    </asp:GridView>
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <asp:Button ID="DelSeletedID" runat="server" Text="删除选中" OnClick="DelSeletedID_Click"
                                    CssClass="btn btn-danger"></asp:Button></td>
                        </tr>
                    </table>

                    <WinnerCMS:PageNavigation ID="PageNavigation1" runat="server" OnPageChanging="PageNavigation1_PageChanging"></WinnerCMS:PageNavigation>

                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>
    </form>
</body>
</html>
